<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>


<form action="<?php echo url_for('album/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getId() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
  <input type="hidden" name="sf_method" value="put" />
  <?php echo $form->renderHiddenFields(false) ?>
<?php endif; ?>
<?php if ($form->hasGlobalErrors()) : ?>
  <div class="error_message">
  <?php echo $form->renderGlobalErrors() ?>
  </div>
  <br />
<?php endif; ?>

  <?php echo $form['picasa_id']->renderLabel() ?>
  <?php echo $form['picasa_id']->renderError() ?>
  <?php echo $form['picasa_id'] ?>
  
  <div class="form_field">
  <?php echo $form['send_email']->renderLabel() ?>&nbsp;<?php echo $form['send_email'] ?>
  </div>

  <div class="form_buttons">
    <a class="btn darkblue" href="<?php echo url_for('album/index') ?>">Cancelar</a>
<?php if (!$form->getObject()->isNew()): ?>
    <?php echo link_to('Remover', 'album/delete?id='.$form->getObject()->getId(), array('class' => 'btn darkblue', 'method' => 'delete', 'confirm' => 'Voc&ecirc; tem certeza?')) ?>
<?php endif; ?>
    <input class="submit_btn darkblue" type="submit" value="Adicionar" />
  </div>
</form>

